<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/tiers.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateAdressePostaleTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form>
                <h:panelGrid columns="3">
                    <h:outputLabel value="#{bundle.CreateAdressePostaleLabel_labelAdresse}" for="labelAdresse" />
                    <p:inputText id="labelAdresse" required="true" value="#{adressePostaleController.selected.labelAdresse}" title="#{bundle.CreateAdressePostaleTitle_labelAdresse}" />
                    <p:message for="labelAdresse"/>
                    <h:outputLabel value="#{bundle.CreateAdressePostaleLabel_categorieAdressePostale}" for="categorieAdressePostale" />
                    <p:selectOneMenu id="categorieAdressePostale" value="#{adressePostaleController.selected.categorieAdressePostale}" title="#{bundle.CreateAdressePostaleTitle_categorieAdressePostale}" >
                        <f:selectItems value="#{categorieAdressePostaleController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="categorieAdressePostale"/>
                    <h:outputLabel value="#{bundle.CreateAdressePostaleLabel_ligne1Adresse}" for="ligne1Adresse" />
                    <p:inputText id="ligne1Adresse" value="#{adressePostaleController.selected.ligne1Adresse}" title="#{bundle.CreateAdressePostaleTitle_ligne1Adresse}" />
                    <p:message for="ligne1Adresse"/>
                    <h:outputLabel value="#{bundle.CreateAdressePostaleLabel_ligne2Adresse}" for="ligne2Adresse" />
                    <p:inputText id="ligne2Adresse" value="#{adressePostaleController.selected.ligne2Adresse}" title="#{bundle.CreateAdressePostaleTitle_ligne2Adresse}" />
                    <p:message for="ligne2Adresse"/>
                    <h:outputLabel value="#{bundle.CreateAdressePostaleLabel_ligne3Adresse}" for="ligne3Adresse" />
                    <p:inputText id="ligne3Adresse" value="#{adressePostaleController.selected.ligne3Adresse}" title="#{bundle.CreateAdressePostaleTitle_ligne3Adresse}" />
                    <p:message for="ligne3Adresse"/>
                    <h:outputLabel value="#{bundle.CreateAdressePostaleLabel_codePostal}" for="codePostal" />
                    <p:inputText id="codePostal" value="#{adressePostaleController.selected.codePostal}" title="#{bundle.CreateAdressePostaleTitle_codePostal}" />
                    <p:message for="codePostal"/>
                    <h:outputLabel value="#{bundle.CreateAdressePostaleLabel_ville}" for="ville" />
                    <p:inputText id="ville" value="#{adressePostaleController.selected.ville}" title="#{bundle.CreateAdressePostaleTitle_ville}" />
                    <p:message for="ville"/>
                    <h:outputLabel value="#{bundle.CreateAdressePostaleLabel_pays}" for="pays" />
                    <p:selectOneMenu id="pays" value="#{adressePostaleController.selected.pays}" title="#{bundle.CreateAdressePostaleTitle_pays}" >
                        <f:selectItems value="#{paysController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="pays"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{adressePostaleController.create}" value="#{bundle.CreateAdressePostaleSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{adressePostaleController.prepareList}" value="#{bundle.CreateAdressePostaleShowAllLink}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
